<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta content="width=device-width, initial-scale=1,user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
          name="viewport">
    <!-- 上述meta标签*必须*放在最前面，作用是自适应布局 -->
    <title>AppInfo</title>
    <meta content="App Info Power by Linling Core" name="description">
    <meta content="Linling Core" name="author">
    <!-- Bootstrap、Jquery、Linling核心CSS和JS -->
    <link href="/linling-static/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="/linling-static/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/linling-static/jquery/3.5.1/jquery.min.js" type="text/javascript"></script>
    <script src="/linling-static/linling-core/js/linling-core-tools.js" type="text/javascript"></script>
    <!-- 适用于Surface /台式机Windows 8错误的IE10视口黑客 -->
    <script src="/linling-static/linling-core/js/ie10-viewport-bug-workaround.js" type="text/javascript"></script>
    <link href="/linling-static/linling-core/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <!-- 首页样式 -->
    <link href="/linling-static/linling-style/css/index.css" rel="stylesheet">
    <!-- 背景样式 -->
    <link href="/linling-static/linling-core/css/background.css" rel="stylesheet">
    <script src="/linling-static/linling-core/js/three.min.js" type="text/javascript"></script>
    <!-- AppInfo -->
    <script type="text/javascript">
        $(function () {
            // 获取信息
            httpGo(
                "/linling/core/appInfo",
                {},
                function (data) {
                    saveLocal(CACHE_APP_INFO, data.data);
                    loadAppInfo(data.data);
                },
                "GET",
                function () {
                    /* 获取 app info */
                    let author = {
                        emil: "lpc@hll520.cn",
                        name: "冷朴承",
                        webSite: "http://www.hll520.cn",
                        webName: "hll520.cn"
                    };
                    let app = {
                        appName: "linLing Core",
                        appVersion: "v1.2",
                        appHost: "/",
                        appDescription: "LinLing Core is a SpringBoot framework that have many modules and complete SQL monitor and API document",
                        appApiHost: "/swagger-ui/index.html",
                        appSQLManageHost: "/druid/login.html",
                        appAuthor: author
                    };
                    loadAppInfo(app);
                }
            );
        });

        /* load app info */
        function loadAppInfo(app) {
            $("#appName").html(app.infos.appName);
            $("#appInfoName").html(`
             Linling Core
                        <span class="label label-info" style="vertical-align: super;font-size: 15px" id="appVersion">${app.appVersion}</span>
            `);
            $("#appInfo").html(app.infos.appDescription);
            $("#appHost").attr("href", app.infos.appHost);
            $("#appHostUrl").attr("href", app.infos.appHost);
            $("#APIHost").attr("href", app.hosts.appApiHost);
            $("#SQLHost").attr("href", app.hosts.appSQLManageHost);
            // 作者信息
            let author = app.infos.appAuthor;
            $("#authorInfo").html(`
            <p>
            Power by
            <a href="mailto:${author.emil}">@${author.name}</a>
             ,Personal Website for
             <a href="${author.webSite}">${author.webName}</a>
             </p>
            `);
        }
    </script>
</head>
<body>
<div class="site-wrapper">
    <div class="site-wrapper-inner">
        <div class="cover-container">
            <!-- 选项卡 -->
            <div class="masthead clearfix">
                <div class="inner">
                    <a href="#" id="appHostUrl"><h3 class="masthead-brand" id="appName">LinlingCore</h3></a>
                    <nav>
                        <ul class="nav masthead-nav">
                            <li class="active"><a href="/linling/info.html">应用信息</a></li>
                            <li><a href="/swagger-ui/index.html" id="APIHost">API查询</a></li>
                            <li><a href="/druid/login.html" id="SQLHost">SQL监控</a></li>
                            <li><a href="/linling/manage.html" id="CoreManage">管理后台</a></li>
                        </ul>
                    </nav>
                </div>
            </div>

            <!-- app信息 -->
            <div class="inner cover"
                 style="margin-top: 20px;margin-bottom: 25px;padding: 20px;background-color: rgba(152,206,234,0.3);border-radius: 20px">
                <div class="form-signin" style="padding: 20px">
                    <h1 class="cover-heading" id="appInfoName" style="margin-bottom: 25px">
                        Linling Core
                        <span class="label label-info" id="appVersion" style="vertical-align: super;font-size: 15px">v1.0</span>
                    </h1>
                    <h4 id="appInfo" style="margin-bottom: 50px">
                        LinLing Core is a SpringBoot framework that have many modules
                        and complete SQL monitor and API document
                    </h4>
                    <a href="#" id="appHost" style="margin-bottom: 25px">
                        <button class="btn btn-lg btn-info btn-block">
                            GO
                        </button>
                    </a>
                </div>
            </div>

            <!-- 页脚 -->
            <div class="mastfoot">
                <div class="inner" id="authorInfo">
                    <p>Power by Linling Core</p>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
